package ptaTest1;

import java.util.Scanner;
public class Test15 {
	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner in = new Scanner(System.in);
		int num = in.nextInt();
		String st=Integer.toBinaryString(num);
		while(st!=null)
		{
		int count=0;
		if(st.length()<=32)
		{
			count=32-st.length();
		}
		if(num==0)
		{
			count=32;
		}
		System.out.println(count);
		num = in.nextInt();
		st=Integer.toBinaryString(num);
		}
	}
}